FROM node:12
LABEL maintainer="liyaocong <375102274@qq.com>"
WORKDIR /app/web/
RUN mkdir -p /app/web/cert
RUN mv /etc/apt/sources.list /etc/apt/sources.list.backup
RUN echo "deb http://mirrors.aliyun.com/debian stretch main contrib non-free" >> /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/debian stretch-proposed-updates main contrib non-free" /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free"  /etc/apt/sources.list

RUN echo "deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free"  /etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/debian stretch-proposed-updates main contrib non-free"  /etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free"  /etc/apt/sources.list

RUN echo "deb http://mirrors.aliyun.com/debian-security/ stretch/updates main non-free contrib"  /etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/debian-security/ stretch/updates main non-free contrib"  /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyuncs.com/debian stretch main contrib non-free"  /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyuncs.com/debian stretch-proposed-updates main contrib non-free" /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyuncs.com/debian stretch-updates main contrib non-free"  /etc/apt/sources.list

RUN echo "deb-src http://mirrors.aliyuncs.com/debian stretch main contrib non-free"  /etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyuncs.com/debian stretch-proposed-updates main contrib non-free"  /etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyuncs.com/debian stretch-updates main contrib non-free"  /etc/apt/sources.list

RUN echo "deb http://mirrors.aliyuncs.com/debian-security/ stretch/updates main non-free contrib"  /etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyuncs.com/debian-security/ stretch/updates main non-free contrib"  /etc/apt/sources.list
RUN apt-get update -y && apt-get upgrade -y
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN npm install socket.io@2.0.4 && npm install node-static && npm install log4js && npm install express && npm install serve-index
